<template>
	<view class="container">
		<view class="name">
			<view class="name_top name_border">
				<view class="img_con">
					<view class="" style="width: 60rpx;">
						<image src="../../static/img/personal/personal_1.png" mode=""></image>
					</view>

					<view class="">
						昵称
					</view>
				</view>
				<view class="">
					{{userinfo.nickname}}
				</view>
			</view>
			<view class="name_bottom">
				<view class="name_top name_margin">
					<view class="img_con">
						<view class="" style="width: 60rpx;">
							<image src="../../static/img/personal/personal_2.png" mode="" style="width:28rpx;height: 28rpx;"></image>
						</view>
						<view class="">
							性别
						</view>
					</view>
					<view class="">
						{{userinfo.sex==1?"男":"女"}}
					</view>
				</view>
				<view class="name_top name_margin">
					<view class="img_con">
						<view class="" style="width: 60rpx;">
							<image src="../../static/img/personal/personal_3.png" mode="" style="width:28rpx;height: 31rpx;"></image>
						</view>
						
						<view class="">
							年龄
						</view>
					</view>
					<view class="">
						{{userinfo.age}}
					</view>
				</view>
				<view class="name_top">
					<view class="img_con">
						<view class="" style="width: 60rpx;">
							<image src="../../static/img/personal/personal_4.png" mode="" style="width:34rpx;height: 25rpx;"></image>
						</view>
						
						<view class="">
							学历
						</view>
					</view>
					<view class="">
						{{userinfo.education}}
					</view>
				</view>
				<view class="btn">
					基本资料
				</view>

			</view>

		</view>
		<view class="name" v-for="(item,index) in userinfo.educationText" :key="index">
			<view class="name_top name_border">
				<view class="img_con">
					<view class="" style="width: 60rpx;">
						<image src="../../static/img/personal/personal_5.png" mode="" style="width:30rpx;height: 28rpx;"></image>
					</view>
					
					<view class="">
						学校
					</view>
				</view>
				<view class="">
					{{item.school}}
				</view>
			</view>
			<view class="name_bottom">
				<view class="name_top name_margin">
					<view class="img_con">
						<view class="" style="width: 60rpx;">
						<image src="../../static/img/personal/personal_6.png" mode="" style="width:26rpx;height: 33rpx;"></image>	
						</view>
						
						<view class="">
							所学专业
						</view>
					</view>
					<view class="">
						{{item.major}}
					</view>
				</view>
				<view class="name_top name_margin">
					<view class="img_con">
						<view class="" style="width: 60rpx;">
							<image src="../../static/img/personal/personal_7.png" mode="" style="width:30rpx;height: 30rpx;"></image>
						</view>
						
						<view class="">
							入学时间
						</view>
					</view>
					<view class="">
						{{item.beginTime}}
					</view>
				</view>
				<view class="name_top">
					<view class="img_con">
						<view class="" style="width: 60rpx;">
							<image src="../../static/img/personal/personal_8.png" mode="" style="width:34rpx;height: 25rpx;"></image>
						</view>
						
						<view class="">
							毕业时间
						</view>
					</view>
					<view class="">
						{{item.endTime}}
					</view>
				</view>
				<view class="btn">
					教育经历
				</view>

			</view>

		</view>
		<view class="name"  v-for="(item,index) in userinfo.jobText" :key="index+'1'">
			<view class="name_top name_border">
				<view class="img_con">
					<view class="" style="width: 60rpx;">
						<image src="../../static/img/personal/personal_9.png" mode="" style="width:26rpx;height: 26rpx;"></image>
					</view>
					
					<view class="">
						工作类型
					</view>
				</view>
				<view class="">
					{{item.jobType}}
				</view>
			</view>
			<view class="name_bottom">
				<view class="name_top name_margin">
					<view class="img_con">
						<view class="" style="width: 60rpx;">
							<image src="../../static/img/personal/personal_10.png" mode="" style="width:27rpx;height: 24rpx;"></image>
						</view>
						
						<view class="">
							工作职位
						</view>
					</view>
					<view class="">
						{{item.job}}
					</view>
				</view>
				<view class="name_top name_margin">
					<view class="img_con">
						<view class="" style="width: 60rpx;">
							<image src="../../static/img/personal/personal_7.png" mode="" style="width:30rpx;height: 30rpx;"></image>
						</view>
						
						<view class="">
							开始时间
						</view>
					</view>
					<view class="">
						{{item.beginTime}}
					</view>
				</view>
				<view class="name_top name_margin">
					<view class="img_con">
						<view class="" style="width: 60rpx;">
							<image src="../../static/img/personal/personal_4.png" mode="" style="width:34rpx;height: 25rpx;"></image>
						</view>
						
						<view class="">
							结束时间
						</view>
					</view>
					<view class="">
						{{item.endTime}}
					</view>
				</view>
				<view class="name_top name_margin">
					<view class="img_con">
						<view  style="width: 60rpx;">
							<image src="../../static/img/personal/personal_11.png" mode="" style="width:33rpx;height: 31rpx;"></image>
						</view>
						
						<view class="">
							工作城市
						</view>
					</view>
					<view class="">
						{{item.city}}
					</view>
				</view>
				<view class="name_top">
					<view class="img_con">
						<view class="" style="width: 60rpx;">
							<image src="../../static/img/personal/personal_12.png" mode="" style="width:40rpx;height: 40rpx;"></image>
						</view>
						
						<view class="">
							公司名称
						</view>
					</view>
					<view class="">
						{{item.company}}
					</view>
				</view>
				<view class="btn">
					工作经历
				</view>

			</view>

		</view>

		<view class="fixed_btn">
			<view class="weixin_part" @click="refuse()">
				<image src="../../static/img/personal/personal_13.png" mode=""></image>
				<view class="">
					不合格
				</view>
			</view>
			<view class="third_part" @click="recruitJoinStatus()">
				<image src="../../static/img/personal/personal_14.png" mode=""></image>
				<view class="">
					合格通过
				</view>
			</view>
			<view class="four_part" @click="startCall()">
				<image src="../../static/img/personal/personal_15.png" mode=""></image>
				<view class="">
					视频面试
				</view>
			</view>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				userinfo:[],
				orderId:null,
				status:3,
				userId:null,
			}
		},
		onLoad(e) {
			this.orderId = e.id
			this.userId = e.uid
		},
		mounted() {
			this.getuserinfo()
		},
		methods: {
			getuserinfo() {
				this.$utils
					.requert({
						url: 'scanUser',
						type: 'post',
						data:{userId:this.userId}
					})
					.then(res => {
						if (res.code === 1) {
							// this.$utils.showLayer(res.message)
							this.userinfo = res.data;
							
						} else {
							this.$utils.showLayer(res.message);
						}
					});
			},
			//订单状态更改
			recruitJoinStatus(){
				this.$utils
					.requert({
						url: 'recruitJoinStatus',
						type: 'post',
						data:{
							orderId:this.orderId,
							status:this.status
						}
					})
					.then(res => {
						if (res.code === 1) {
							this.$utils.showLayer(res.message)
							uni.navigateBack()
						} else {
							this.$utils.showLayer(res.message);
						}
					});
			},
			//不合格
			refuse(){
				this.status = 6
				this.recruitJoinStatus()
			},
			startCall(){
				uni.$emit("startCall",{
					id:this.userinfo.id+"",
					nickname:this.userinfo.nickname,
					avatar:this.userinfo.avatar
				});
			}
		}
	}
</script>
<style>
	page {
		width: 100%;
		background-color: #f5f4f6;
		;
	}
</style>

<style scoped>
	.container {
		width: 100%;
		height: 100%;
		font-size: 28rpx;
		color: #333333;
		padding-top: 8rpx;
		padding-bottom: 110rpx;
	}

	.fixed_btn {
		width: 100%;
		height: 112rpx;
		position: fixed;
		bottom: 0;
		left: 0;
		background-color: #fff;
		display: flex;
		border-top: 1rpx solid #f6f6f6;
		text-align: center;
		align-items: center;
	}

	.fixed_btn .weixin_part {
		font-size: 24rpx;
		color: #838282;
		flex: 1
	}

	.fixed_btn .weixin_part image {
		width: 28rpx;
		height: 38rpx;
	}

	.fixed_btn .third_part {
		width: 272rpx;
		height: 100%;
		font-size: 34rpx;
		color: #fff;
		background: linear-gradient(0deg, #ffc500, #ff9503);
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.fixed_btn .third_part image {
		width: 26rpx;
		height: 33rpx;
	}

	.fixed_btn .third_part .money {
		font-size: 30rpx;
	}

	.fixed_btn .four_part {
		width: 272rpx;
		height: 100%;
		font-size: 34rpx;
		color: #fff;
		background: linear-gradient(0deg, #ff7701, #ff4a00);
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.fixed_btn .four_part image {
		width: 31rpx;
		height: 31rpx;
	}

	.fixed_btn .four_part .money {
		font-size: 28rpx;
	}

	.name {
		margin: 24rpx;
		background-color: #fff;
		border-radius: 10rpx;
		padding: 26rpx 30rpx;
		box-sizing: border-box;

	}

	.name_top {
		display: flex;
	}

	.name_bottom {
		margin-top: 34rpx;
		position: relative;
	}

	.name_margin {
		margin-bottom: 37rpx;
	}

	.name_border {
		padding-bottom: 28rpx;
		border-bottom: 1px solid #e6e6e6;
	}

	.name_top .img_con {
		display: flex;
		margin-right: 94rpx;
	}

	.name_top .img_con image {
		/* margin-right: 28rpx; */
		width: 29rpx;
		height: 25rpx;
		margin-top: 6rpx;
	}

	.name_top .img_con view:nth-child(2) {
		width: 112rpx;
	}

	.btn {
		color: #fff;
		font-size: 30rpx;
		width: 180rpx;
		height: 64rpx;
		text-align: center;
		line-height: 64rpx;
		background: linear-gradient(-90deg, rgba(255, 160, 8, 1), rgba(255, 131, 5, 1));
		border-radius: 32px;
		position: absolute;
		top: 30%;
		right: 0;
	}
</style>
